package com.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dao.PersonDao;
import com.entity.Pagination;
import com.entity.Person;
@Service
public class PersonServiceImp implements PersonService {
	@Autowired
	private PersonDao personDao;

	@Override
	public Integer insertPerson(Person person) {
		return personDao.insertPerson(person);
	}

	@Override
	public List<Person> getAllPersons(Pagination pagination,Person person) {
		return personDao.getAllPersons(pagination,person);
	}

	@Override
	public Integer deletePerson(Person person) {
		return personDao.deletePerson(person);
	}

	@Override
	public int countAll(Person person) {
		return personDao.countAll(person);
	}

	@Override
	public Integer updatePerson(Person person) {
		return personDao.updatePerson(person);
		
	}

	@Override
	public Person findById(Integer id) {
		return personDao.findById(id);
	}

	@Override
	public List<Person> getAllPersonsByBirthday(Pagination page) {
		return personDao.getAllPersonsByBirthday(page);
	}

	@Override
	public int countAllByBirthday() {
		return personDao.countAllByBirthday();
	}

 
}
